<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <div id="app">
      <ul>
        <!-- 只要循环就要条件反射一样的加key -->
        <!-- key最好加的是类似于id -->

        <!-- 尽量不要使用index作为key -->
        <li v-for="(item, index) in items" :key="item._id">
          {{ item.message }}
        </li>
      </ul>
    </div>

    <script src="../Vue.js"></script>
    <script>
      new Vue({
        el: "#app",
        data: {
          items: [
            { message: "Foo", _id: "123dewf34gf3r" },
            { message: "Bar", _id: "hrtgregerg" },
          ],
          arr: [1, 3, 4, 5, 6, 6, 6],
        },
      });
    </script>
  </body>
</html>
